package service.impl;

import dao.LessonDao;
import dao.impl.LessonDaoImpl;
import entity.Lesson;
import service.LessonService;

import java.util.ArrayList;

public class LessonServiceImpl implements LessonService {

    private LessonDao dao = new LessonDaoImpl();

    @Override
    public ArrayList<Lesson> findLessons(String username) throws Exception {
        return dao.findLessons(username);
    }

    @Override
    public Lesson findByCode(String code) {
        return null;
    }

    @Override
    public int insert(Lesson lesson) {
        return 0;
    }

    @Override
    public int update(Lesson lesson) {
        return 0;
    }

    @Override
    public int disapprove(String lessoncode, String student, String disapprovereason) throws Exception {
        return dao.disapprove(lessoncode, student, disapprovereason);
    }

    @Override
    public int apply(String lessoncode, String student, String applyreason) throws Exception {
        return dao.apply(lessoncode, student, applyreason);
    }

    @Override
    public int updatestatus(String lessoncode,String student,String status,boolean flag) throws Exception {
        return dao.updatestatus(lessoncode,student,status,flag);
    }
}
